#coding=utf-8
"""
Author:陆孝
Time:2025/9/4 0004 10:03
"""
'''
此模块是用来处理ini文件的工具类
'''

from configparser import ConfigParser
from utils.handle_path import *
import os

class Handle_conf(ConfigParser):
    '''当前这个类是用来处理conf.ini文件的'''
    def __init__(self,filename):
        super(Handle_conf, self).__init__()
        self.filename = filename
        self.read(self.filename)

    def get_value(self,section,option):
        '''获取ini文件中section对应的option的value值'''
        value = self.get(section,option)
        return value
path = os.path.join(conf_path,'conf.ini')
conf = Handle_conf(path)
print(conf.get_value('env','url'))